Matthias Clasen [Mon, 11 May 2020 12:51:08 +0000 (12:51 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #2729 and #2730
See merge request GNOME/gtk!1870
Matthias Clasen [Mon, 11 May 2020 04:17:53 +0000 (00:17 -0400)]
menubutton: Cosmetics
Fix a few typos in the docs.
Matthias Clasen [Mon, 11 May 2020 01:26:19 +0000 (21:26 -0400)]
Refresh the tutorial examples
Redo this series of examples from 2013, and adapt it to modern
way of doing things. The biggest differences are that we use
a headerbar right from the start, and don't mention the app
menu.
Fixes: #2730
Matthias Clasen [Mon, 11 May 2020 00:15:31 +0000 (20:15 -0400)]
applicationswindow: Make show-menubar FALSE by default
The fallback to the menubar is not a good sight,
we should not do that by default.
Matthias Clasen [Sun, 10 May 2020 22:23:32 +0000 (18:23 -0400)]
docs: Cosmetic updates to the tutorial
Since the meson conversion, we are no longer expanding
gtk-doc references in this file, so take them out. And
touch up the wording in various places.
Matthias Clasen [Sun, 10 May 2020 21:13:26 +0000 (17:13 -0400)]
Clean up a leak in a test
One of the treeview tests was calling gtk_widget_destroy
on a child instead of the toplevel, which leaks the toplevel
unnecessarily. Plus, we're moving towards allowing destroy
only on toplevels.
Matthias Clasen [Sun, 10 May 2020 18:07:17 +0000 (14:07 -0400)]
treeviewcolumn: Another case of box <> frame confusion
Don't call your boxes frames, folks!
Matthias Clasen [Sun, 10 May 2020 17:29:40 +0000 (13:29 -0400)]
builderscope: Fix finalize <> dispose confusion
Don't chain up to dispose if you implement finalize.
This fix s courtesy of GOBJECT_DEBUG=objects.
Matthias Clasen [Sun, 10 May 2020 17:18:22 +0000 (13:18 -0400)]
print dialog: Fix frame <> box confusion
It is a bad idea to have a GtkBox called frame, event
if it started out its existence as a GtkFrame.
Matthias Clasen [Sun, 10 May 2020 17:16:52 +0000 (13:16 -0400)]
treeview: Ensure search popover is properly inserted
The css tree and the widget tree are not in sync, so we need
to explicitly set the parent of the css node before inserting
the widget, or else we end up with critical warnings and a
non-working popover.
This can be seen in the print dialog, when moving the focus
to the printer list.
Matthias Clasen [Sun, 10 May 2020 16:59:27 +0000 (12:59 -0400)]
print-editor: Cosmetics
Make the about dialog a bit less barren.
Matthias Clasen [Sun, 10 May 2020 16:53:37 +0000 (12:53 -0400)]
print-editor: Fix a critical
GtkWindow is no longer a container, so don't call
gtk_container_add on it.
Matthias Clasen [Mon, 11 May 2020 11:23:15 +0000 (11:23 +0000)]
Merge branch 'focusable-property' into 'master'
Focusable property
See merge request GNOME/gtk!1834
Emmanuele Bassi [Mon, 11 May 2020 10:02:53 +0000 (10:02 +0000)]
Merge branch 'aperezdc/vk-result-range-size' into 'master'
Fix build issue due to missing VK_RESULT_RANGE_SIZE
See merge request GNOME/gtk!1871
Adrian Perez de Castro [Mon, 11 May 2020 07:07:41 +0000 (10:07 +0300)]
Fix build issue due to missing VK_RESULT_RANGE_SIZE
Conditionally check whether the Vulkan headers version defines
VK_RESULT_RANGE_SIZE, and avoid using it for version >=140. The
following comming in Vulkan-Headers has removed the enum value:
https://github.com/KhronosGroup/Vulkan-Headers/commit/
0c5351f5e9114d3e9033aeae51d036a3d201c082#diff-
4febd94c0666d59030d8b1dd20c72403
Matthias Clasen [Mon, 11 May 2020 04:29:41 +0000 (00:29 -0400)]
Clarify docs around focus.
Matthias Clasen [Mon, 11 May 2020 03:58:30 +0000 (23:58 -0400)]
Remove lots of focus vfuncs
In many cases, the default widget vfuncs work just fine,
combined with setting focusable.
Matthias Clasen [Mon, 11 May 2020 03:42:02 +0000 (23:42 -0400)]
widget: Fix gtk_widget_focus_all for !focusable
This was a case that wasn't handle properly when
the focus is entering from the outside, in forward
direction.
Matthias Clasen [Tue, 5 May 2020 18:57:21 +0000 (14:57 -0400)]
widget: Add a :focusable property
Add back a property that determines whether an individual
widget will accept focus or not. :can-focus prevents the
focus from ever entering the entire widget hierarchy
below a widget, and :focusable just determines if grabbing
the focus to the widget itself will succeed.
See #2686
Matthias Clasen [Sun, 10 May 2020 15:12:07 +0000 (11:12 -0400)]
testsuite: Add more tests for automated components
Add template tests that show the complex dialogs before
destroying them. This reveals that we are leaking in
several of them. These leaks don't show up if the
dialogs are destroyed right away, as the existing
tests do.
Disable the two failing tests for now:
/template/GtkFileChooserDialog/show
/template/GtkPrintUnixDialog/show
Matthias Clasen [Sun, 10 May 2020 14:50:18 +0000 (10:50 -0400)]
testsuite: Use lowercase component in test paths
This is purely cosmetic.
Matthias Clasen [Sun, 10 May 2020 13:16:32 +0000 (09:16 -0400)]
textview: Ensure popup menu is properly inserted
In the presence of attached children, the css tree and the
widget tree are not in sync, so we need to explicitly set
the parent of the css node before inserting the widget, or
else we end up with critical warnings and a non-working
menu.
This can be seen in testtextview.
Matthias Clasen [Sun, 10 May 2020 13:14:25 +0000 (09:14 -0400)]
textview: Give attached children a different css name
If we use "text" for the children that are attached to the
text view, they end up rendering the same background as the
main text content, causing that content to be covered up.
Fixes: #2729
Aurimas Černius [Sun, 10 May 2020 19:34:16 +0000 (22:34 +0300)]
Updated Lithuanian translation
Matthias Clasen [Sun, 10 May 2020 18:15:57 +0000 (18:15 +0000)]
Merge branch 'wip/exalm/headerbar-dragging' into 'master'
Extract GtkWindow dragging and titlebar actions
Closes #2689
See merge request GNOME/gtk!1814
Yuri Chornoivan [Sun, 10 May 2020 16:03:34 +0000 (16:03 +0000)]
Update Ukrainian translation
Piotr Drąg [Sun, 10 May 2020 12:34:33 +0000 (14:34 +0200)]
Update POTFILES.in
Christoph Reiter [Sun, 10 May 2020 06:31:37 +0000 (08:31 +0200)]
CI: install brotli in msys2
Not a direct dependency, but the freetype package is missing it atm
Matthias Clasen [Sun, 10 May 2020 00:36:49 +0000 (00:36 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
window: Remove some dead code
Closes #2726 and #2724
See merge request GNOME/gtk!1862
Matthias Clasen [Sat, 9 May 2020 23:41:30 +0000 (19:41 -0400)]
placesview: Don't do the same thing twice
When the schema is supported, we want to remove
the error style class, not add it again. Pointed
out by Rafał Mikrut.
Fixes: #2724
Matthias Clasen [Sat, 9 May 2020 23:40:06 +0000 (19:40 -0400)]
gsk: Fix a typo
We were checking x_offset twice, when we meant to check
x_offset and y_offset. Pointed out by Rafał Mikrut.
Fixes: #2726
Matthias Clasen [Sat, 9 May 2020 23:23:29 +0000 (19:23 -0400)]
Add a test for refcounts under reordering
It turns out that we have a ref leak at the very
core of our dom model :( gtk_widget_insert_before/after
leak a reference if the widget was already under
the same parent. This is something that GtkBox
frequently does. It shows up e.g. when packing
widgets at the end in a headerbar.
Matthias Clasen [Sat, 9 May 2020 23:27:05 +0000 (19:27 -0400)]
widget: Don't leak a reference when reordering
When reordering a widget that is alrady under the
same parent, we must not take another reference.
Matthias Clasen [Sat, 9 May 2020 13:22:14 +0000 (09:22 -0400)]
window: Remove some dead code
We are not attaching windows anymore.
Daniel Șerbănescu [Sat, 9 May 2020 18:19:28 +0000 (18:19 +0000)]
Update Romanian translation
Florentina Mușat [Sat, 9 May 2020 17:18:59 +0000 (17:18 +0000)]
Update Romanian translation
Kristjan SCHMIDT [Sat, 9 May 2020 10:20:43 +0000 (10:20 +0000)]
Update Esperanto translation
Matthias Clasen [Fri, 8 May 2020 15:50:33 +0000 (15:50 +0000)]
Merge branch 'carlosgc/content-provider-union-write' into 'master'
clipboard: GdkContentProviderUnion should return after writing the first matched format
See merge request GNOME/gtk!1856
Matthias Clasen [Fri, 8 May 2020 15:05:50 +0000 (15:05 +0000)]
Merge branch 'tintou/gsk-transform-autocleanup' into 'master'
gsk: Add GskTransform autocleanup definition
See merge request GNOME/gtk!1859
Matthias Clasen [Fri, 8 May 2020 14:55:46 +0000 (14:55 +0000)]
Merge branch 'gbsneto/css-dequeue-fix' into 'master'
csswidgetnode: Don't check for container
See merge request GNOME/gtk!1861
Matthias Clasen [Fri, 8 May 2020 14:51:59 +0000 (14:51 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1860
Georges Basile Stavracas Neto [Fri, 8 May 2020 13:51:54 +0000 (10:51 -0300)]
csswidgetnode: Don't check for container
The conditions to queue and dequeue a CSS validation
are different; while queueing checks if the widget is
a root, dequeueing checks that AND if the widget is
a container.
GtkWindow is not a GtkContainer anymore, and that is
causing validations to be queued, but never dequeued.
Don't require the widget to be a GtkContainer for
dequeuing.
Matthias Clasen [Fri, 8 May 2020 13:07:29 +0000 (09:07 -0400)]
placeview: Hide the protocols grid when its empty
Seeing just the bold headings at the bottom of the
popover is confusing, so just hide the entire grid
in this case.
Matthias Clasen [Fri, 8 May 2020 12:47:06 +0000 (08:47 -0400)]
droptarget: Fix confusion around ::leave signal
The leave signal should not take any arguments,
don't pass the GdkDrop. Update the documentation,
fix the emission and update users to match.
This was showing up as crash when dragging files
over the places sidebar.
Corentin Noël [Fri, 8 May 2020 07:14:55 +0000 (09:14 +0200)]
gsk: Add GskTransform autocleanup definition
Alexander Mikhaylenko [Wed, 6 May 2020 13:38:59 +0000 (18:38 +0500)]
testsuite: Update bloomfilter test
Add the 2 new css nodes.
Alexander Mikhaylenko [Sat, 2 May 2020 15:37:51 +0000 (20:37 +0500)]
window: Stop handling dragging and titlebar actions
Since GtkWindowHandle and GtkHeaderBar do it now, it can be removed from
GtkWindow, along with GTK_WINDOW_REGION_TITLE which at this point doesn't
differ from GTK_WINDOW_REGION_CONTENT.
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/2689, since
GtkWindowHandle doesn't do that anymore.
Alexander Mikhaylenko [Sat, 2 May 2020 15:37:41 +0000 (20:37 +0500)]
headerbar: Include GtkWindowHandle
This allows it to continue being draggable when placed inside a window, and
will allow to remove the corresponding gestures from GtkWindow.
Alexander Mikhaylenko [Fri, 1 May 2020 22:01:12 +0000 (03:01 +0500)]
headerbar: Use GtkCenterBox internally
This will allow to easily wrap it into another widget in the next commits.
Alexander Mikhaylenko [Sat, 2 May 2020 15:37:32 +0000 (20:37 +0500)]
Add GtkWindowHandle
This will allow to move the titlebar handling logic out from GtkWindow.
Carlos Garcia Campos [Thu, 7 May 2020 09:21:18 +0000 (11:21 +0200)]
clipboard: GdkContentProviderUnion should return after writing the first matched format
It continues trying with the other providers due to a missing early
return.
Alexander Mikhaylenko [Sat, 2 May 2020 15:34:15 +0000 (20:34 +0500)]
widget: Pass parent to gtk_widget_consumes_motion()
Right now it assumes that the parent is a GtkWindow. This will break when
window dragging is handled by another widget.
Matthias Clasen [Thu, 7 May 2020 02:56:04 +0000 (02:56 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Fix an inspector crash
See merge request GNOME/gtk!1855
Matthias Clasen [Thu, 7 May 2020 02:25:51 +0000 (22:25 -0400)]
Fix an inspector crash
Fix the listmodel semantics of the controller model,
by making get_item return a reference.
This was broken in
4b9e5304cc.
Matthias Clasen [Thu, 7 May 2020 01:40:39 +0000 (01:40 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
modelbutton: Unify activation code paths
See merge request GNOME/gtk!1854
Matthias Clasen [Thu, 7 May 2020 00:25:42 +0000 (20:25 -0400)]
modelbutton: Unify activation code paths
Opening submenus by Enter or Space wasn't working,
because we had different code paths for activation
via keynav and via click. Unify them.
Emmanuele Bassi [Wed, 6 May 2020 22:53:42 +0000 (22:53 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!1853
Emmanuele Bassi [Wed, 6 May 2020 18:31:07 +0000 (19:31 +0100)]
Annotate gtk_text_child_anchor_get_widgets() correctly
We switched from returning a list to returning a C array, which means we
need to update the introspection annotation and the documentation to
match the implementation.
Emmanuele Bassi [Wed, 6 May 2020 18:28:33 +0000 (19:28 +0100)]
Annotate gdk_motion_event_get_history() correctly
We moved from returning a list to returning a C array, and this requires
a change in the annotations.
Georges Basile Stavracas Neto [Wed, 6 May 2020 22:02:17 +0000 (22:02 +0000)]
Merge branch 'gbsneto/array-clear-func' into 'master'
icontheme: Don't free array element
Closes #2717
See merge request GNOME/gtk!1851
Matthias Clasen [Wed, 6 May 2020 21:47:47 +0000 (21:47 +0000)]
Merge branch 'wip/exalm/polish' into 'master'
Random polish
See merge request GNOME/gtk!1850
Matthias Clasen [Wed, 6 May 2020 21:35:08 +0000 (21:35 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
nodeeditor: Don't use container api on list box rows
See merge request GNOME/gtk!1852
Georges Basile Stavracas Neto [Wed, 6 May 2020 21:06:09 +0000 (18:06 -0300)]
icontheme: Don't free array element
When setting a clear function on a GArray, unlike
most other places, this free func is expected to
*not* free the array element itself -- only its
contents.
Don't free the array element.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2717
Matthias Clasen [Wed, 6 May 2020 21:03:12 +0000 (17:03 -0400)]
nodeeditor: Don't use container api on list box rows
GtkListBoxRow is not a container anymore.
Alexander Mikhaylenko [Wed, 6 May 2020 20:29:33 +0000 (01:29 +0500)]
widget-factory: Remove duplicate margin-start
Alexander Mikhaylenko [Wed, 6 May 2020 20:29:20 +0000 (01:29 +0500)]
widget-factory: Align spinbutton in the list on page 2
Alexander Mikhaylenko [Wed, 6 May 2020 20:21:26 +0000 (01:21 +0500)]
video: Use more appropriate revealer transition
Matthias Clasen [Wed, 6 May 2020 20:13:22 +0000 (20:13 +0000)]
Merge branch 'gbsneto/fix-text-child-header' into 'master'
textchild: Include <gtk/gtkwidget.h>
See merge request GNOME/gtk!1846
Matthias Clasen [Wed, 6 May 2020 20:02:27 +0000 (20:02 +0000)]
Merge branch 'master.struct.msvc' into 'master'
gtk/gtkaccelgroup.c: Fix build on Visual Studio
See merge request GNOME/gtk!1785
Matthias Clasen [Wed, 6 May 2020 20:01:45 +0000 (20:01 +0000)]
Merge branch 'wip/exalm/row' into 'master'
placesview: Stop using gtk_container_add() for GtkListBoxRow
See merge request GNOME/gtk!1849
Alexander Mikhaylenko [Wed, 6 May 2020 20:01:12 +0000 (01:01 +0500)]
adwaita: Remove a redundant -gtk-icon-shadow: none
Buttons have no icon shadows anymore anyway.
Alexander Mikhaylenko [Wed, 6 May 2020 19:59:44 +0000 (00:59 +0500)]
adwaita: Don't style window menu button anymore
Those were removed with the introduction of GtkWindowControls, no need to
exclude them from the round style anymore.
Alexander Mikhaylenko [Wed, 6 May 2020 19:37:55 +0000 (00:37 +0500)]
adwaita: Use tabular figures where appropriate
Port
82b9be3297db7baeb605c286b01978bab02b5373 from GTK3.
Matthias Clasen [Wed, 6 May 2020 19:25:32 +0000 (19:25 +0000)]
Merge branch 'drop-click-gesture-area' into 'master'
gestureclick: Drop the area
See merge request GNOME/gtk!1847
Matthias Clasen [Wed, 6 May 2020 19:24:58 +0000 (19:24 +0000)]
Merge branch 'master-disable-introspection' into 'master'
CI: disable introspection with mingw to avoid flaky builds
See merge request GNOME/gtk!1848
Christoph Reiter [Wed, 6 May 2020 19:19:52 +0000 (21:19 +0200)]
CI: use bash style variable expansion for the mingw cache key
It doesn't understand the powershell syntax which leads to the cache
key being empty which leads to cache restore being skipped
which leads to slow builds not using ccache.
See https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2747
Jakub Steiner [Wed, 6 May 2020 19:22:27 +0000 (19:22 +0000)]
Merge branch 'wip/jimmac/HC-focus' into 'master'
HC: more contrasty focus rings
See merge request GNOME/gtk!1845
Alexander Mikhaylenko [Wed, 6 May 2020 19:19:03 +0000 (00:19 +0500)]
adwaita: Make popover border transparent
Port
379669b153595fd1a33b200f6b08e7d5ba0407f4 from GTK3.
Matthias Clasen [Wed, 6 May 2020 19:15:31 +0000 (19:15 +0000)]
Merge branch 'abolish-size-allocate' into 'master'
Abolish size allocate
Closes #2705
See merge request GNOME/gtk!1833
Alexander Mikhaylenko [Wed, 6 May 2020 19:15:19 +0000 (00:15 +0500)]
adwaita: Update app icon shadow
Port
f95f3c707aa5a4b1c7b76b2bb43a43519eaf9433 from GTK3.
Alexander Mikhaylenko [Wed, 6 May 2020 17:10:16 +0000 (22:10 +0500)]
placesview: Stop using gtk_container_add() for GtkListBoxRow
Matthias Clasen [Wed, 6 May 2020 19:08:36 +0000 (15:08 -0400)]
Update CONTRIBUTING.md
Point to discourse, rather than mailing lists.
Based on a suggestion by sujiniku,
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1763
Matthias Clasen [Wed, 6 May 2020 19:01:25 +0000 (19:01 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
keymap: Remove leftover code
See merge request GNOME/gtk!1844
Christoph Reiter [Wed, 6 May 2020 18:33:46 +0000 (20:33 +0200)]
CI: disable introspection with mingw to avoid flaky builds
g-i has started to fail and it's not clear why, so disable it for
now to keep the build green.
See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/340
Matthias Clasen [Wed, 6 May 2020 18:32:09 +0000 (18:32 +0000)]
Merge branch 'wip/jimmac/dark-seuggested' into 'master'
Adwaita: tone down suggested focus ring for dark
See merge request GNOME/gtk!1843
Matthias Clasen [Wed, 6 May 2020 03:12:20 +0000 (23:12 -0400)]
widget: Drop the ::size-allocate signal
This signal is mainly used for bad things, and we
don't want to emit signals during layout if we can
avoid it.
If you are subclassing, you should either use a
layout manager or override the size_allocate vfunc.
If you are using a GtkDrawingArea or GtkGLArea,
use their ::resize signals to learn about size
changes.
Fixes: #2705
Matthias Clasen [Wed, 6 May 2020 02:11:55 +0000 (22:11 -0400)]
tooltipwindow: Stop using the ::size-allocate signal
Instead of connecting to ::size-allocate, call
gtk_native_set_tooltip and rely on the native
to allocate the tooltip window.
Matthias Clasen [Wed, 6 May 2020 01:19:20 +0000 (21:19 -0400)]
tooltipwindow: Drop some dead code
Matthias Clasen [Wed, 6 May 2020 17:56:27 +0000 (13:56 -0400)]
tooltip: Add private api to allocate the window
Add private gtk_tooltip_maybe_allocate() function
and use it from GtkWindow and GtkPopover.
This will let us stop using the ::size-allocate signal,
without having to redo all the tooltip management first.
That will happen later.
Emmanuele Bassi [Mon, 20 Apr 2020 16:10:40 +0000 (17:10 +0100)]
Explicitly update widget a11y bounds when allocating
The a11y machinery is using signal subscription to get notified of size
changes and notify listeners in turn. This is suboptimal for a couple of
reasons:
- if something connects to the GtkWidget::size-allocate signal we need
to emit it; currently, we have an optimization in place that will
skip the signal emission if there are no handlers, and it would be
nice to go through the fast path
- the accessibility implementation is part of GTK, and should not go
through additional hoops like any out-of-tree API consumer
Matthias Clasen [Tue, 5 May 2020 16:15:36 +0000 (12:15 -0400)]
tests: Stop using ::size-allocate
Matthias Clasen [Tue, 5 May 2020 15:57:49 +0000 (11:57 -0400)]
inspector: Stop using ::size-allocate
This signal is going away. Currently, there is no
other way for the inspector to monitor the allocation.
Matthias Clasen [Tue, 5 May 2020 15:54:47 +0000 (11:54 -0400)]
examples: Use GtkDrawingArea::resize
This signal is a replacement for this (ab)use
of the ::size-allocate signal, which is going away.
Matthias Clasen [Tue, 5 May 2020 15:53:25 +0000 (11:53 -0400)]
gtk-demo: Use GtkDrawingArea::resize
This signal is a replacement for this (ab)use
of ::size-allocate.
Matthias Clasen [Tue, 5 May 2020 15:49:00 +0000 (11:49 -0400)]
drawingarea: Add a ::resize signal
This can be used as a replacement for ::size-allocate
to prepare size-dependent resources, like a backing
surface. It mirrors the GtkGLArea::resize signal.
Matthias Clasen [Tue, 5 May 2020 16:11:05 +0000 (12:11 -0400)]
a11y: Avoid a gratitious use of ::size-allocate
The paned widget has a position property, just
use it.
Matthias Clasen [Tue, 5 May 2020 16:12:15 +0000 (12:12 -0400)]
cellarea: Cosmetics
Remove an occurrence of size-allocate in a comment.
Matthias Clasen [Tue, 5 May 2020 16:10:35 +0000 (12:10 -0400)]
treeview: Cosmetic change
Remove an occurrence of size-allocate in a comment.
Matthias Clasen [Tue, 5 May 2020 16:00:15 +0000 (12:00 -0400)]
window: Remove some outdated info from the docs
Remove references to ::size-allocate and ::configure-event
from the docs.
Matthias Clasen [Wed, 6 May 2020 17:15:45 +0000 (13:15 -0400)]
keymap: Remove leftover code
When I removed the 0-termination for the entries for
each keyval, I remove the code initializing the key,
but accidentally left the code that adds it to the
array, so gdk_keymap_get_cached_entries_for_keyval
returns one extra, uninitialized value at the end
of the array. Stop doing that.